package com.baosight.sczx.zm.cl.service;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.ep.ServiceEPBase;
import com.baosight.sczx.common.zm.basetools.StaticTools;
import com.baosight.sczx.zm.cl.domain.ZMCLTernateHandleProcess_x;

/**
 * 三违处理过程
 * <p>Title: ServiceZMCL64.java</p>
 * <p>Description: 三违处理结果从表</p>
 * <p>Copyright: Baosight Software LTD.co Copyright (c) 2002</p>
 * <p>Company: Baosight Software</p>
 * @author  高强
 * @version 1.0
 * <pre>Histroy:
 *           2011-4-18       高强  Create
 *           2011-10-12      张志芳  update
 *</pre>
 */
public class ServiceZMCL63 extends ServiceEPBase {
	
	/** 
	 * <p>Function: initLoad</p>
	 * <p>Description: 当前页面托管加载初始化操作</p>
	 * <p>return value: EiInfo</p>
	 * <p>throws Exception:</p>
	 * <p>History:
	 *    2011-6-24 上午张志芳
	 * </p>
	 *
	*/
	@Override
	public EiInfo initLoad(EiInfo inInfo) 
	{
		inInfo.addBlock(EiConstant.resultBlock).set("showCount", "true");//如果不加这个，翻页的统计和显示是错误的
		EiInfo outInfo = this.query(inInfo);
		return outInfo;
	}
	
	/**
	 * <p>Function: query</p>
	 * <p>Description:查询 </p>
	 * <p>return value: EiInfo</p>
	 * <p>throws Exception:</p>
	 * <p>History:
	 *    2011-6-24 上午 张志芳
	 * </p>
	 *
	*/
	@Override
	public EiInfo query(EiInfo inInfo) {
		String fdTernateRecordId = inInfo.getString("fdTernateRecordId");//三违记录ID
		
		StaticTools.setQueryParameters(inInfo, "fdTernateRecordId", fdTernateRecordId, true);//添加查询条件
		inInfo.addBlock(EiConstant.resultBlock).set(EiConstant.offsetStr, 0);
		inInfo.getBlock(EiConstant.resultBlock).set(EiConstant.limitStr, 100);
		inInfo.getBlock(EiConstant.resultBlock).set(EiConstant.isCountFlag, true);
		EiInfo outInfo = super.query(inInfo, "ZMCLTernateHandleProcess_x.query", new ZMCLTernateHandleProcess_x());
		return outInfo;
	}
}
